using JoyfulHomeJourney.BackEnd.Infrastructure.EFCore;
using JoyfulHomeJourney.BackEnd.Infrastructure.Dtos.Responses.Objects;
using JoyfulHomeJourney.BackEnd.Infrastructure.Tools;
namespace JoyfulHomeJourney.BackEnd.Server.Instances.Extends.Responses
{
	public static class ShippingAddressesExtend
{
		public static ResponseShippingAddressesDto ToResponseDto(this ShippingAddresses entity)
{			return new ResponseShippingAddressesDto
			{
				createAt = entity.SaCreateAt,
				createAtStr =Tools.TimeToString(entity.SaCreateAt),
				detaiedlAddress = entity.SaDetaiedlAddress,
				id = entity.SaId,
				postalCode = entity.SaPostalCode,
				recipientName = entity.SaRecipientName,
				recipientPhone = entity.SaRecipientPhone,
				shippingId = entity.SaShippingId,
				updateAt = entity.SaUpdateAt,
				updateAtStr =Tools.TimeToString(entity.SaUpdateAt),
			};
		}
	}
}
